<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增过滤约束')" />
	<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-filter-add">
        	<input type="hidden" name="token" th:value="${session.token}"/>
			<div class="form-group">	
				<label class="col-sm-2 control-label">约束名称：</label>
				<div class="col-sm-10">
					<input id="filterName" name="filterName" class="form-control" type="text" required="required">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">约束表达式：</label>
				<div class="col-sm-10">
					<input id="filterKey" name="filterKey" class="form-control" type="text" required="required">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">约束方法值：</label>
				<div class="col-sm-10">
					<input id="filterValue" name="filterValue" class="form-control" type="text" required="required">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">约束状态：</label>
				<div class="col-sm-10">
				    <div class="radio-box" th:each="dict : ${@dict.getDict('sys_data_status')}">
						<input type="radio" th:id="${dict.id}" name="status" th:value="${dict.dictValue}" th:checked="${dict.isDefault == 'Y'}">
						<label th:for="${dict.id}" th:text="${dict.dictName}"></label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">显示顺序：</label>
				<div class="col-sm-10">
					<input class="form-control" type="number" name="orderNum" required="required">
				</div>
			</div>
			<div class="form-group">
                 <label class="col-xs-2 control-label">备注：</label>
                 <div class="col-xs-10">
                     <textarea name="remark" maxlength="500" class="form-control" rows="3"></textarea>
                 </div>
             </div>
		</form>
	</div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: summernote-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/filter";
		
		function submitHandler() {
	        if ($.validate.form()) {
				$.operate.save(prefix + "/add", $('#form-filter-add').serialize());
	        }
	    }
	</script>
</body>
</html>
